#include "splashscene.h"


SplashScene::SplashScene(GameApp* app): AppScene(app)
{
    m_time = 0.0f;
    m_renderWrap = new SinglePictureRenderWrap("resources/splash.png",800.0f,600.0f);

}

SplashScene::~SplashScene()
{
    SAFE_DELETE_OBJ(m_renderWrap);
}

void SplashScene::render()
{
    m_renderWrap->render(0.0f,0.0f);
    //printf("splash render!\n");
}

void SplashScene::update(TimeSeconds deltalTime)
{
    m_renderWrap->update();
    m_time += deltalTime;

    if(m_time >= 2.0f)
    {
        m_app->setGameState(GameApp::GAMESTATE_MENU);
        m_time = 0.0f;
    }
    //printf("splash update!\n");
}
